(1) Field of the Invention
This invention relates to a drawing device and an information processing apparatus, and more particularly to a drawing device and an information processing apparatus that regard an object to be drawn as a collection of a plurality of polygons, and map texture data onto polygons, respectively, to thereby draw the object.
(2) Description of the Related Art
When an information processing apparatus draws a two-dimensional or three-dimensional image, the apparatus represents the image to be drawn as a collection of a plurality of polygons by modeling, and pastes image data called a texture onto each polygon by mapping, whereby the apparatus can draw the image such that it gives a real sense of texture.
Now, when such textures are enlarged and pasted to an object to be drawn, simple enlargement of the textures results in reproduction of a coarser image. To overcome this problem, colors surrounding each point (pixel) to be drawn are weighted and averaged in drawing the object. This blurs boundaries between colors of the textures, and hence the coarseness of the image can be made less conspicuous. This processing is called “bilinear filtering”.
FIG. 7 is a diagram useful in explaining the principles of bilinear filtering. In FIG. 7, reference numerals P1 to P3 designate pixels, and reference numerals C00, C10, C20, C01, C11, C21 designate texture pixels (texels), respectively.
For instance, a case in which the pixel P1 is drawn will be considered. In bilinear filtering, the texels C00, C10, C01, C11 are multiplied by respective weights determined according to the distances of the texels from the pixel P1, and the products of the multiplications are added up to determine a value indicative of the color information of the pixel P1. For instance, the color information of the pixel P1 is determined by the following equation (1):P1=C00×0.6+C10×0.5+C01×0.5+C11×0.4  (1)
where C00, C01, C10, C11 represent respective information items of corresponding texels.
As described above, in bilinear filtering, the color of the pixel P1 is determined by taking a weighed average of colors surrounding the pixel P1. This blurs the boundaries between the color of the texture corresponding to the pixel P1 and the neighboring colors, whereby the coarseness of the image can be made less conspicuous.
FIG. 8 is a diagram showing a form in which texture data having a size of 8 by 8 data is stored in a memory. As shown in FIG. 8, texture data having a size of 8 by 8 data is formed by 64 texel information items D00 to D63, and hence these items are sequentially stored in respective addresses of the memory in this order of D00 to D63.
Therefore, the texels and the texel information items has correspondence between them such that C00 corresponds to D00, C10 corresponds to D01, C01 corresponds to D08, and so on.
In the above case, for instance, if texture coordinates corresponding to a pixel are (1.0, 1.0), four texel information items D00, D01, D08, D09 are required for performing bilinear filtering processing. In this case, a pair of information items D00 and D01, and a pair of information items D08 and D09 are stored in respective pairs of successive addresses, and hence there is a high possibility that each pair of information items can be read out by one readout operation. However, since one pair of addresses storing one pair of information items are remote from the other pair of addresses storing the other pair of information items, it is necessary to carry out at least two readout operations so as to read out all the four texel information items.
Further, if texel information items forming each pair are stored in addresses corresponding to two successive access units of the memory in a straddling fashion, it is necessary to access the memory three or four times.
Therefore, in the above conventional method, the need for accessing the memory a plurality of times arises to read out texel information items necessary for carrying out one bilinear filtering operation, so that it is difficult to enhance the operating speed of the information processing apparatus.